package com.zwp.base.ext

import android.widget.CheckBox
import androidx.databinding.BindingAdapter
import com.zwp.base.binding.BindingCommand

@BindingAdapter(value = ["onCheckedChangedCommand"])
fun onCheckedChangedCommand(checkBox: CheckBox, bindingCommand: BindingCommand<Boolean>) {
    checkBox.setOnCheckedChangeListener { compoundButton, b ->
        bindingCommand.execute(b)
    }
}